import React from 'react';
import {
  Form,
  Modal,
  Tooltip,
} from 'antd';

import DescriptionList from '@/components/DescriptionList';

const { Description } = DescriptionList;
import styles from '../UserManage.less';

// 查看详情
const DescView = Form.create()(props => {
  const { lookDescView, handleLookDesc, selectedRows } = props;
  const type = (val) => {
    if (val === 1) {
      return 'android';
    } else if (val === 3) {
      return 'ios';
    } else {
      return '全部';
    }
  };
  console.log(1234, selectedRows);
  return (
    <Modal
      width={640}
      destroyOnClose
      title="Banner信息"
      visible={lookDescView}
      onOk={() => handleLookDesc(false,[])}
      onCancel={() => handleLookDesc(false, [])}>
      <DescriptionList size="large" style={{ marginBottom: 32 }} col="1">
        <Description term="标题">{selectedRows.title}</Description>
        <Description term="app头图">{<a target={'_blank'} href={selectedRows.appImg}>
          <img className={styles.brandLogo} src={selectedRows.appImg}
               alt=""/></a>}</Description>
        <Description term="app运营报告">{<a target={'_blank'} href={selectedRows.appReport}>
          <img className={styles.brandLogo} src={selectedRows.appReport}
               alt=""/></a>}</Description>
        <Description term="pc头图">{<a target={'_blank'} href={selectedRows.pcImg}>
          <img className={styles.brandLogo} src={selectedRows.pcImg}
               alt=""/></a>}</Description>
        <Description term="pc运营报告">{<a target={'_blank'} href={selectedRows.pcReport}>
          <img className={styles.brandLogo} src={selectedRows.pcReport}
               alt=""/></a>}</Description>
        <Description term="状态">{selectedRows.status === 1 ? '启用' : '停用'}</Description>
        <Description term="创建人">{selectedRows.createName}</Description>
        <Description term="发布时间">{selectedRows.publishTime}</Description>
        <Description term="创建时间">{selectedRows.createTime}</Description>
      </DescriptionList>

    </Modal>
  );
});

export default DescView;
